// vector 空间预留
#include <iostream>
#include <vector>
using namespace std;

int main()
{
    vector<int> v;
    v.reserve(100);//预留 100 的容量（capacity+100),但 size 仍然为 0

    for(int i=0;i<100;i++)
    {
        cout<<"size = "<<v.size()<<","<<"capacity = "<<v.capacity()<<endl;
        v.push_back(i);
    }

    //reserve 修改的是 capacity
    //resize  修改的是 size

    return 0;
}